3.5.93 \(\int (b \sec (e+f x))^n \sin ^3(e+f x) \, dx\) [493]

Optimal. Leaf size=52 \[ \frac {b^3 (b \sec (e+f x))^{-3+n}}{f (3-n)}-\frac {b (b \sec (e+f x))^{-1+n}}{f (1-n)} \]

[Out]

b^3*(b*sec(f*x+e))^(-3+n)/f/(3-n)-b*(b*sec(f*x+e))^(-1+n)/f/(1-n)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2702, 14} \begin {gather*} \frac {b^3 (b \sec (e+f x))^{n-3}}{f (3-n)}-\frac {b (b \sec (e+f x))^{n-1}}{f (1-n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(b*Sec[e + f*x])^n*Sin[e + f*x]^3,x]

[Out]

(b^3*(b*Sec[e + f*x])^(-3 + n))/(f*(3 - n)) - (b*(b*Sec[e + f*x])^(-1 + n))/(f*(1 - n))

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2702

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rubi steps

\begin {align*} \int (b \sec (e+f x))^n \sin ^3(e+f x) \, dx &=\frac {b^3 \text {Subst}\left (\int x^{-4+n} \left (-1+\frac {x^2}{b^2}\right ) \, dx,x,b \sec (e+f x)\right )}{f}\\ &=\frac {b^3 \text {Subst}\left (\int \left (-x^{-4+n}+\frac {x^{-2+n}}{b^2}\right ) \, dx,x,b \sec (e+f x)\right )}{f}\\ &=\frac {b^3 (b \sec (e+f x))^{-3+n}}{f (3-n)}-\frac {b (b \sec (e+f x))^{-1+n}}{f (1-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.11, size = 47, normalized size = 0.90 \begin {gather*} -\frac {b (5-n+(-1+n) \cos (2 (e+f x))) (b \sec (e+f x))^{-1+n}}{2 f (-3+n) (-1+n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(b*Sec[e + f*x])^n*Sin[e + f*x]^3,x]

[Out]

-1/2*(b*(5 - n + (-1 + n)*Cos[2*(e + f*x)])*(b*Sec[e + f*x])^(-1 + n))/(f*(-3 + n)*(-1 + n))

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 1.22, size = 1732, normalized size = 33.31

method result size
risch \(\text {Expression too large to display}\) \(1732\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*sec(f*x+e))^n*sin(f*x+e)^3,x,method=_RETURNVERBOSE)

[Out]

-1/8/(f*n-3*f)*2^n*(exp(2*I*(f*x+e))+1)^(-n)*b^n*exp(I*(f*x+e))^n*exp(-1/2*I*(Pi*n*csgn(I/(exp(2*I*(f*x+e))+1)
)*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))-Pi*n*csgn(I/(exp(2*I*(f*x+e))+1))*csgn(I*
exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2-Pi*n*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))
^2+Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3-Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*
b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2+Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b*exp(I*(f*x+
e))/(exp(2*I*(f*x+e))+1))*csgn(I*b)+Pi*n*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3-Pi*n*csgn(I*b*exp(I*(
f*x+e))/(exp(2*I*(f*x+e))+1))^2*csgn(I*b)+6*f*x+6*e))-1/8*exp(I*(f*x+e))^n*b^n*(exp(2*I*(f*x+e))+1)^(-n)*2^n/(
f*n-3*f)*exp(1/2*I*(-Pi*n*csgn(I/(exp(2*I*(f*x+e))+1))*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(
f*x+e))+1))+Pi*n*csgn(I/(exp(2*I*(f*x+e))+1))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2+Pi*n*csgn(I*exp(I*
(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2-Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3+Pi*
n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2-Pi*n*csgn(I*exp(
I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b)-Pi*n*csgn(I*b*exp(I*(
f*x+e))/(exp(2*I*(f*x+e))+1))^3+Pi*n*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2*csgn(I*b)+6*f*x+6*e))+1/8
*exp(I*(f*x+e))^n*b^n*(exp(2*I*(f*x+e))+1)^(-n)*2^n/(-3+n)/(-1+n)/f*(n-9)*exp(-1/2*I*(Pi*n*csgn(I/(exp(2*I*(f*
x+e))+1))*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))-Pi*n*csgn(I/(exp(2*I*(f*x+e))+1))
*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2-Pi*n*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x
+e))+1))^2+Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3-Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))
*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2+Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b*exp
(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b)+Pi*n*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3-Pi*n*csgn(I*b
*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2*csgn(I*b)+2*f*x+2*e))+1/8*exp(I*(f*x+e))^n*b^n*(exp(2*I*(f*x+e))+1)^(-
n)*2^n/(-3+n)/(-1+n)/f*(n-9)*exp(1/2*I*(-Pi*n*csgn(I/(exp(2*I*(f*x+e))+1))*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I
*(f*x+e))/(exp(2*I*(f*x+e))+1))+Pi*n*csgn(I/(exp(2*I*(f*x+e))+1))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^
2+Pi*n*csgn(I*exp(I*(f*x+e)))*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2-Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*
I*(f*x+e))+1))^3+Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1)
)^2-Pi*n*csgn(I*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))*csgn(I*b)-P
i*n*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^3+Pi*n*csgn(I*b*exp(I*(f*x+e))/(exp(2*I*(f*x+e))+1))^2*csgn(
I*b)+2*f*x+2*e))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 63, normalized size = 1.21 \begin {gather*} -\frac {\frac {b^{n} \cos \left (f x + e\right )^{-n} \cos \left (f x + e\right )^{3}}{n - 3} - \frac {b^{n} \cos \left (f x + e\right )^{-n} \cos \left (f x + e\right )}{n - 1}}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*sec(f*x+e))^n*sin(f*x+e)^3,x, algorithm="maxima")

[Out]

-(b^n*cos(f*x + e)^(-n)*cos(f*x + e)^3/(n - 3) - b^n*cos(f*x + e)^(-n)*cos(f*x + e)/(n - 1))/f

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 56, normalized size = 1.08 \begin {gather*} -\frac {{\left ({\left (n - 1\right )} \cos \left (f x + e\right )^{3} - {\left (n - 3\right )} \cos \left (f x + e\right )\right )} \left (\frac {b}{\cos \left (f x + e\right )}\right )^{n}}{f n^{2} - 4 \, f n + 3 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*sec(f*x+e))^n*sin(f*x+e)^3,x, algorithm="fricas")

[Out]

-((n - 1)*cos(f*x + e)^3 - (n - 3)*cos(f*x + e))*(b/cos(f*x + e))^n/(f*n^2 - 4*f*n + 3*f)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*sec(f*x+e))**n*sin(f*x+e)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*sec(f*x+e))^n*sin(f*x+e)^3,x, algorithm="giac")

[Out]

integrate((b*sec(f*x + e))^n*sin(f*x + e)^3, x)

________________________________________________________________________________________

Mupad [B]
time = 0.94, size = 67, normalized size = 1.29 \begin {gather*} -\frac {{\left (\frac {b}{\cos \left (e+f\,x\right )}\right )}^n\,\left (9\,\cos \left (e+f\,x\right )-\cos \left (3\,e+3\,f\,x\right )-n\,\cos \left (e+f\,x\right )+n\,\cos \left (3\,e+3\,f\,x\right )\right )}{4\,f\,\left (n^2-4\,n+3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(e + f*x)^3*(b/cos(e + f*x))^n,x)

[Out]

-((b/cos(e + f*x))^n*(9*cos(e + f*x) - cos(3*e + 3*f*x) - n*cos(e + f*x) + n*cos(3*e + 3*f*x)))/(4*f*(n^2 - 4*
n + 3))

________________________________________________________________________________________